package fuben;
import bank.TransactionType;

import java.time.LocalDateTime;

public class TransactionRecord {
    private int id;
    private String accountNumber;
    private LocalDateTime timestamp;
    private bank.TransactionType type;
    private double amount;
    private String counterpartyAccount;
    private double postBalance;
    public TransactionRecord(int id, LocalDateTime timestamp, String accountNumber, bank.TransactionType type, double amount, String counterpartyAccount,
                             double postBalance) {
        this.id = id;
        this.timestamp = timestamp;
        this.accountNumber = accountNumber;
        this.type = type;
        this.amount = amount;
        this.counterpartyAccount = counterpartyAccount;
        this.postBalance = postBalance;
    }
    public TransactionRecord() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(LocalDateTime timestamp) {
        this.timestamp = timestamp;
    }

    public bank.TransactionType getType() {
        return type;
    }

    public void setType(TransactionType type) {
        this.type = type;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getCounterpartyAccount() {
        return counterpartyAccount;
    }

    public void setCounterpartyAccount(String counterpartyAccount) {
        this.counterpartyAccount = counterpartyAccount;
    }

    public double getPostBalance() {
        return postBalance;
    }

    public void setPostBalance(double postBalance) {
        this.postBalance = postBalance;
    }

    @Override
    public String toString() {
        return "TransactionRecord{" +
                "id=" + id +
                ", accountNumber='" + accountNumber + '\'' +
                ", timestamp=" + timestamp +
                ", type='" + type + '\'' +
                ", amount=" + amount +
                ", counterpartyAccount='" + counterpartyAccount + '\'' +
                ", postBalance=" + postBalance +
                '}';
    }
}
